package innerclass;

public class Parcel6 {
    private void internalTracking(boolean b){
        if (b){//嵌在作用域内
            class TrackingSlip{
                private String id;
                TrackingSlip(String s){
                    id=s;
                }
                String getId(){
                    return id;
                }
            }
            TrackingSlip trackingSlip=new TrackingSlip("hello!");
            String s=trackingSlip.getId();
        }
    }
    public void track(){
            internalTracking(true);
    }

    public static void main(String[] args) {
        Parcel6 parcel6=new Parcel6();
        parcel6.track();
    }

}
